package com.github.yoojia.mqtt.boot;

/**
 * @author Yoojia Chen (yoojiachen@gmail.com)
 * @since 1.0
 */
public enum PatternType {

    PubSub("EVENT"),
    ReqRep("REQREP");

    final String typeName;

    PatternType(String typeName) {
        this.typeName = typeName;
    }

    static PatternType of(String name) {
        if (PubSub.typeName.equalsIgnoreCase(name)) {
            return PubSub;
        } else {
            return ReqRep;
        }
    }
}
